home *** CD-ROM | disk | FTP | other *** search
- { Created: 1993-12-01
-
- Program to test the Post Mortem Debugger
-
- }
-
-
- {$Q+}
- program TestPMD;
-
- uses BBError,
- Objects, ObjMemory,
- {$IFDEF Windows}
- WinCrt,
- {$ENDIF}
- PMD;
-
- type
- types = (test1, test2, test3);
-
-
- procedure GenerateError(var f : text; e: types);
-
- procedure InSide(o : TObjMemory);
- var
- w : word;
- d : word;
- begin
- w := 0;
- w := w - 1;
- end;
-
- begin
- InSide(GetObjMemory(100, 0, memfAll)^);
- end;
-
-
- var
- f : text;
- begin
- { display information about this program }
- writeln('Post Mortem Debugger tester.');
- writeln('If this program is compiled with debug info on,');
- writeln('see TESTPMD.LOG after this program halts.');
-
- { initialize log file unit }
- InitBBError('TESTPMD.LOG', TRUE);
-
- { initialize memory handling unit }
- InitObjMemory;
-
- { initialize PMD with symbolic stack dump and data segment dump }
- InitPMD(dfStandard);
-
- { open a text file, nice in symbolic stack dump and dseg dump }
- Assign(f, 'TESTPMD.PAS');
- Reset(f);
-
- { generate the error }
- GenerateError(f, test2);
-
- { we don't need to clean up of course, because we will never reach this... }
- end.
-